<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>$lang.get('browser.title')</title>
	<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
	<meta name="description" content="$lang.get('browser.description')" >

	<link rel="shortcut icon" href="/giiwa.png" type="image/png" />

	<link href='/css/icons.css' rel='stylesheet' />
	<link href='/css/tablesorter.css' rel='stylesheet' />
	<link href='/css/giiwa.css' rel='stylesheet' />

	<script type="text/javascript" src="/js/jquery-2.1.4.min.js"></script>
<style>
.header{
    background: #188ada;
    color: #fff;
    padding: 10px 0;	
}
.header .who{
    position: absolute;
    right: 200px;
    top: 11px;
    width: 150px;
}
#nav{
    width: 200px;
    float: left;
    line-height: 26px;	
}	
</style>
</head>
<body>
<div class='header'>
	<h1>内部消息 Demo</h1>
	<div class='who'>Welcome, $me.nickname <div class='tips'></div></div>
</div>

<div id='nav'>
	<ul>
		<li>
			<a href="javascript:;" onclick="$('#panel .content').iframe('/message/send')">发消息</a>
		</li>
		<li>
			<a href='javascript:;' onclick="$('#panel .content').iframe('/message/inbox')">收件箱</a>
		</li>
		<li>
			<a href='javascript:;' onclick="$('#panel .content').iframe('/message/outbox')">发件箱</a>
		</li>
	</ul>
	
</div>
<div id='panel'>
	<div class='content'></div>
</div>

<div id="processing" style="display: none;">
	<div class="bg"></div>
	<div class="img">
		<img src="/images/loading2.gif">
	</div>
</div>

<script src="/js/jquery.iframe.js"></script>

<script>
$(function(){
	$('#panel .content').iframe('/message/inbox');
	
	_refresh();
})

function _refresh() {
	$.post('/message/popup', {}, function(d){
		$('.header .who .tips').html(d);
	})
	
	setTimeout(_refresh, 5000);
}

var processing = {
		show:function(){
			$('#processing').show();
		},
		hide:function(){
			$('#processing').hide();
		}
	};
</script>

$!global.get('site.counter')
</body>
</html>